home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| dexmagic
| PrintFox/Pagefox WEAK
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/news
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 62 6c | 61 63 6b 2e 77 65 65 67 |Path: bl|ack.weeg|
|00000010| 2e 75 69 6f 77 61 2e 65 | 64 75 21 72 6f 62 69 6e |.uiowa.e|du!robin|
|00000020| 73 6f 6e 0a 46 72 6f 6d | 3a 20 54 68 65 20 41 6d |son.From|: The Am|
|00000030| 6f 72 70 68 6f 75 73 20 | 4d 61 73 73 20 3c 72 6f |orphous |Mass <ro|
|00000040| 62 69 6e 73 6f 6e 40 62 | 6c 75 65 2e 77 65 65 67 |binson@b|lue.weeg|
|00000050| 2e 75 69 6f 77 61 2e 65 | 64 75 3e 0a 4e 65 77 73 |.uiowa.e|du>.News|
|00000060| 67 72 6f 75 70 73 3a 20 | 63 6f 6d 70 2e 6c 61 6e |groups: |comp.lan|
|00000070| 67 2e 63 0a 53 75 62 6a | 65 63 74 3a 20 52 65 3a |g.c.Subj|ect: Re:|
|00000080| 20 72 65 76 69 73 65 64 | 20 63 6f 64 65 20 6f 66 | revised| code of|
|00000090| 20 63 61 6c 6c 69 6e 67 | 20 61 20 66 75 6e 63 74 | calling| a funct|
|000000a0| 69 6f 6e 20 74 77 69 63 | 65 20 66 72 6f 6d 20 70 |ion twic|e from p|
|000000b0| 72 69 6e 74 66 0a 44 61 | 74 65 3a 20 54 75 65 2c |rintf.Da|te: Tue,|
|000000c0| 20 31 32 20 4d 61 72 20 | 31 39 39 36 20 31 37 3a | 12 Mar |1996 17:|
|000000d0| 30 38 3a 34 36 20 2d 30 | 36 30 30 0a 4f 72 67 61 |08:46 -0|600.Orga|
|000000e0| 6e 69 7a 61 74 69 6f 6e | 3a 20 55 6e 69 76 65 72 |nization|: Univer|
|000000f0| 73 69 74 79 20 6f 66 20 | 49 6f 77 61 2c 20 49 6f |sity of |Iowa, Io|
|00000100| 77 61 20 43 69 74 79 2c | 20 49 41 2c 20 55 53 41 |wa City,| IA, USA|
|00000110| 0a 44 69 73 74 72 69 62 | 75 74 69 6f 6e 3a 20 77 |.Distrib|ution: w|
|00000120| 6f 72 6c 64 0a 4d 65 73 | 73 61 67 65 2d 49 44 3a |orld.Mes|sage-ID:|
|00000130| 20 3c 50 69 6e 65 2e 41 | 33 32 2e 33 2e 39 31 2e | <Pine.A|32.3.91.|
|00000140| 39 36 30 33 31 32 31 36 | 35 37 30 36 2e 31 34 39 |96031216|5706.149|
|00000150| 34 37 37 42 2d 31 30 30 | 30 30 30 40 62 6c 61 63 |477B-100|000@blac|
|00000160| 6b 2e 77 65 65 67 2e 75 | 69 6f 77 61 2e 65 64 75 |k.weeg.u|iowa.edu|
|00000170| 3e 0a 52 65 66 65 72 65 | 6e 63 65 73 3a 20 3c 34 |>.Refere|nces: <4|
|00000180| 68 66 73 35 34 24 6b 34 | 65 40 6e 65 77 73 62 66 |hfs54$k4|e@newsbf|
|00000190| 30 32 2e 6e 65 77 73 2e | 61 6f 6c 2e 63 6f 6d 3e |02.news.|aol.com>|
|000001a0| 20 3c 50 69 6e 65 2e 41 | 33 32 2e 33 2e 39 31 2e | <Pine.A|32.3.91.|
|000001b0| 39 36 30 33 30 34 31 37 | 34 32 31 35 2e 39 36 32 |96030417|4215.962|
|000001c0| 30 39 4a 2d 31 30 30 30 | 30 30 40 62 6c 61 63 6b |09J-1000|00@black|
|000001d0| 2e 77 65 65 67 2e 75 69 | 6f 77 61 2e 65 64 75 3e |.weeg.ui|owa.edu>|
|000001e0| 20 3c 34 69 34 71 39 68 | 24 37 70 69 40 6f 61 6b | <4i4q9h|$7pi@oak|
|000001f0| 36 32 2e 64 6f 63 2e 69 | 63 2e 61 63 2e 75 6b 3e |62.doc.i|c.ac.uk>|
|00000200| 0a 4e 4e 54 50 2d 50 6f | 73 74 69 6e 67 2d 48 6f |.NNTP-Po|sting-Ho|
|00000210| 73 74 3a 20 62 6c 61 63 | 6b 2e 77 65 65 67 2e 75 |st: blac|k.weeg.u|
|00000220| 69 6f 77 61 2e 65 64 75 | 0a 4d 69 6d 65 2d 56 65 |iowa.edu|.Mime-Ve|
|00000230| 72 73 69 6f 6e 3a 20 31 | 2e 30 0a 43 6f 6e 74 65 |rsion: 1|.0.Conte|
|00000240| 6e 74 2d 54 79 70 65 3a | 20 54 45 58 54 2f 50 4c |nt-Type:| TEXT/PL|
|00000250| 41 49 4e 3b 20 63 68 61 | 72 73 65 74 3d 55 53 2d |AIN; cha|rset=US-|
|00000260| 41 53 43 49 49 0a 58 2d | 53 65 6e 64 65 72 3a 20 |ASCII.X-|Sender: |
|00000270| 72 6f 62 69 6e 73 6f 6e | 40 62 6c 61 63 6b 2e 77 |robinson|@black.w|
|00000280| 65 65 67 2e 75 69 6f 77 | 61 2e 65 64 75 0a 49 6e |eeg.uiow|a.edu.In|
|00000290| 2d 52 65 70 6c 79 2d 54 | 6f 3a 20 3c 34 69 34 71 |-Reply-T|o: <4i4q|
|000002a0| 39 68 24 37 70 69 40 6f | 61 6b 36 32 2e 64 6f 63 |9h$7pi@o|ak62.doc|
|000002b0| 2e 69 63 2e 61 63 2e 75 | 6b 3e 20 0a 0a 4f 6e 20 |.ic.ac.u|k> ..On |
|000002c0| 31 32 20 4d 61 72 20 31 | 39 39 36 2c 20 4e 69 61 |12 Mar 1|996, Nia|
|000002d0| 6c 6c 20 53 6d 61 72 74 | 20 77 72 6f 74 65 3a 0a |ll Smart| wrote:.|
|000002e0| 0a 3e 20 54 68 65 20 41 | 6d 6f 72 70 68 6f 75 73 |.> The A|morphous|
|000002f0| 20 4d 61 73 73 20 3c 72 | 6f 62 69 6e 73 6f 6e 40 | Mass <r|obinson@|
|00000300| 62 6c 75 65 2e 77 65 65 | 67 2e 75 69 6f 77 61 2e |blue.wee|g.uiowa.|
|00000310| 65 64 75 3e 20 77 72 69 | 74 65 73 3a 0a 3e 20 7c |edu> wri|tes:.> ||
|00000320| 3e 20 53 6f 6d 65 6f 6e | 65 20 77 72 6f 74 65 3a |> Someon|e wrote:|
|00000330| 20 0a 3e 20 7c 3e 20 20 | 59 6f 75 27 72 65 20 72 | .> |> |You're r|
|00000340| 65 74 75 72 6e 69 6e 67 | 20 61 20 70 6f 69 6e 74 |eturning| a point|
|00000350| 65 72 20 74 6f 20 61 6e | 20 61 75 74 6f 6d 61 74 |er to an| automat|
|00000360| 69 63 20 76 61 72 69 61 | 62 6c 65 2c 20 77 68 69 |ic varia|ble, whi|
|00000370| 63 68 20 69 73 20 0a 3e | 20 7c 3e 67 75 61 72 61 |ch is .>| |>guara|
|00000380| 6e 74 65 65 64 20 62 61 | 64 20 6e 65 77 73 2e 0a |nteed ba|d news..|
|00000390| 3e 20 0a 3e 20 7c 3e 3e | 20 63 68 61 72 20 2a 64 |> .> |>>| char *d|
|000003a0| 69 73 70 6c 61 79 5f 64 | 72 75 67 5f 74 79 70 65 |isplay_d|rug_type|
|000003b0| 28 69 6e 74 20 64 72 75 | 67 5f 69 6e 64 65 78 29 |(int dru|g_index)|
|000003c0| 20 7b 0a 3e 20 7c 3e 3e | 20 20 20 20 63 68 61 72 | {.> |>>| char|
|000003d0| 20 64 72 75 67 5f 74 79 | 70 65 5b 38 31 5d 3d 22 | drug_ty|pe[81]="|
|000003e0| 5c 30 22 3b 0a 3e 20 7c | 3e 0a 3e 20 7c 3e 20 20 |\0";.> ||>.> |> |
|000003f0| 6d 61 6b 65 20 74 68 69 | 73 0a 3e 20 7c 3e 20 20 |make thi|s.> |> |
|00000400| 20 20 20 73 74 61 74 69 | 63 20 63 68 61 72 20 64 | stati|c char d|
|00000410| 72 75 67 5f 74 79 70 65 | 5b 38 31 5d 3b 20 20 2f |rug_type|[81]; /|
|00000420| 2a 20 73 74 61 74 69 63 | 20 76 61 72 69 61 62 6c |* static| variabl|
|00000430| 65 73 20 61 72 65 20 61 | 75 74 6f 6d 61 74 69 63 |es are a|utomatic|
|00000440| 61 6c 6c 79 0a 3e 20 7c | 3e 09 09 09 09 20 20 69 |ally.> ||>.... i|
|00000450| 6e 69 74 69 61 6c 69 7a | 65 64 20 74 6f 20 30 2c |nitializ|ed to 0,|
|00000460| 20 61 6e 64 20 69 74 27 | 73 20 73 61 66 65 20 74 | and it'|s safe t|
|00000470| 6f 0a 3e 20 7c 3e 09 09 | 09 09 20 20 72 65 74 75 |o.> |>..|.. retu|
|00000480| 72 6e 20 74 68 65 69 72 | 20 61 64 64 72 65 73 73 |rn their| address|
|00000490| 65 73 20 2d 2d 20 74 68 | 65 79 20 22 70 65 72 73 |es -- th|ey "pers|
|000004a0| 69 73 74 22 20 2a 2f 0a | 3e 20 7c 3e 0a 3e 20 0a |ist" */.|> |>.> .|
|000004b0| 3e 20 49 20 62 65 67 20 | 74 6f 20 64 69 66 66 65 |> I beg |to diffe|
|000004c0| 72 2c 20 74 68 69 73 20 | 61 70 70 72 6f 61 63 68 |r, this |approach|
|000004d0| 20 69 73 20 64 65 66 69 | 6e 61 74 65 6c 79 20 2a | is defi|nately *|
|000004e0| 6e 6f 74 2a 20 73 61 66 | 65 20 2d 20 73 75 62 73 |not* saf|e - subs|
|000004f0| 65 71 75 65 6e 74 20 63 | 61 6c 6c 73 0a 3e 20 74 |equent c|alls.> t|
|00000500| 6f 20 64 69 73 70 6c 61 | 79 5f 64 72 75 67 5f 74 |o displa|y_drug_t|
|00000510| 79 70 65 20 77 69 6c 6c | 20 6f 76 65 72 77 72 69 |ype will| overwri|
|00000520| 74 65 20 74 68 65 20 6d | 65 6d 6f 72 79 20 28 64 |te the m|emory (d|
|00000530| 72 75 67 5f 74 79 70 65 | 5b 5d 29 20 74 68 61 74 |rug_type|[]) that|
|00000540| 20 6d 61 79 20 62 65 0a | 3e 20 72 65 66 65 72 65 | may be.|> refere|
|00000550| 6e 63 65 64 20 62 79 20 | 6f 74 68 65 72 20 70 6f |nced by |other po|
|00000560| 69 6e 74 65 72 73 20 61 | 73 20 73 68 6f 77 6e 20 |inters a|s shown |
|00000570| 69 6e 20 74 68 69 73 20 | 65 78 61 6d 70 6c 65 2e |in this |example.|
|00000580| 0a 0a 20 20 54 68 61 74 | 27 73 20 63 65 72 74 61 |.. That|'s certa|
|00000590| 69 6e 6c 79 20 73 6f 6d | 65 74 68 69 6e 67 20 74 |inly som|ething t|
|000005a0| 6f 20 6c 6f 6f 6b 20 6f | 75 74 20 66 6f 72 2c 20 |o look o|ut for, |
|000005b0| 62 75 74 20 74 68 61 74 | 20 64 6f 65 73 6e 27 74 |but that| doesn't|
|000005c0| 20 6d 65 61 6e 20 74 68 | 61 74 20 0a 74 68 65 20 | mean th|at .the |
|000005d0| 61 70 70 72 6f 61 63 68 | 20 6f 66 20 75 73 69 6e |approach| of usin|
|000005e0| 67 20 61 20 73 74 61 74 | 69 63 20 61 72 72 61 79 |g a stat|ic array|
|000005f0| 20 69 73 20 5f 75 6e 73 | 61 66 65 5f 2c 20 69 74 | is _uns|afe_, it|
|00000600| 20 73 69 6d 70 6c 79 20 | 6d 65 61 6e 73 20 74 68 | simply |means th|
|00000610| 61 74 20 0a 79 6f 75 20 | 68 61 76 65 20 74 6f 20 |at .you |have to |
|00000620| 68 61 76 65 20 74 6f 20 | 75 73 65 20 69 74 20 61 |have to |use it a|
|00000630| 70 70 72 6f 70 72 69 61 | 74 65 6c 79 2e 20 20 73 |ppropria|tely. s|
|00000640| 74 72 74 6f 6b 28 29 2c | 20 66 6f 72 20 65 78 61 |trtok(),| for exa|
|00000650| 6d 70 6c 65 2c 20 72 65 | 74 75 72 6e 73 20 0a 61 |mple, re|turns .a|
|00000660| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 61 20 73 74 | pointer| to a st|
|00000670| 61 74 69 63 20 61 72 72 | 61 79 2c 20 61 6e 64 20 |atic arr|ay, and |
|00000680| 77 69 6c 6c 20 63 61 75 | 73 65 20 74 68 65 20 73 |will cau|se the s|
|00000690| 61 6d 65 20 70 72 6f 62 | 6c 65 6d 20 69 66 20 79 |ame prob|lem if y|
|000006a0| 6f 75 20 75 73 65 20 69 | 74 20 0a 74 68 65 20 77 |ou use i|t .the w|
|000006b0| 61 79 20 79 6f 75 20 75 | 73 65 20 64 69 73 70 6c |ay you u|se displ|
|000006c0| 61 79 5f 64 72 75 67 5f | 74 79 70 65 28 29 20 62 |ay_drug_|type() b|
|000006d0| 65 6c 6f 77 2e 0a 0a 3e | 20 09 63 68 61 72 20 2a |elow...>| .char *|
|000006e0| 70 41 3b 0a 3e 20 09 63 | 68 61 72 20 2a 70 42 3b |pA;.> .c|har *pB;|
|000006f0| 0a 3e 20 0a 3e 20 09 70 | 41 20 3d 20 64 69 73 70 |.> .> .p|A = disp|
|00000700| 6c 61 79 5f 64 72 75 67 | 5f 74 79 70 65 28 69 53 |lay_drug|_type(iS|
|00000710| 6f 6d 65 49 6e 74 29 3b | 0a 3e 20 09 70 42 20 3d |omeInt);|.> .pB =|
|00000720| 20 64 69 73 70 6c 61 79 | 5f 64 72 75 67 5f 74 79 | display|_drug_ty|
|00000730| 70 65 28 69 53 6f 6d 65 | 4f 74 68 65 72 49 6e 74 |pe(iSome|OtherInt|
|00000740| 29 3b 0a 3e 20 0a 3e 20 | 6e 6f 77 20 62 6f 74 68 |);.> .> |now both|
|00000750| 20 2a 70 61 20 61 6e 64 | 20 2a 70 42 20 61 72 65 | *pa and| *pB are|
|00000760| 20 74 68 65 20 73 61 6d | 65 2c 20 65 76 65 6e 20 | the sam|e, even |
|00000770| 69 66 20 69 53 6f 6d 65 | 49 6e 74 20 21 3d 20 69 |if iSome|Int != i|
|00000780| 53 6f 6d 65 4f 74 68 65 | 72 49 6e 74 2e 20 54 68 |SomeOthe|rInt. Th|
|00000790| 69 73 0a 3e 20 69 73 20 | 62 65 63 61 75 73 65 20 |is.> is |because |
|000007a0| 74 68 65 20 61 72 65 61 | 20 6f 66 20 6d 65 6d 6f |the area| of memo|
|000007b0| 72 79 20 74 68 61 74 20 | 64 69 73 70 6c 61 79 5f |ry that |display_|
|000007c0| 64 72 75 67 5f 74 79 70 | 65 20 72 65 74 75 72 6e |drug_typ|e return|
|000007d0| 73 20 69 73 20 61 6c 77 | 61 79 73 20 74 68 65 0a |s is alw|ays the.|
|000007e0| 3e 20 73 61 6d 65 2e 20 | 41 20 62 65 74 74 65 72 |> same. |A better|
|000007f0| 20 73 6f 6c 75 74 69 6f | 6e 20 69 73 20 74 6f 20 | solutio|n is to |
|00000800| 74 61 6b 65 20 61 20 63 | 68 61 72 20 2a 20 61 73 |take a c|har * as|
|00000810| 20 61 6e 20 61 72 67 75 | 6d 65 6e 74 20 6f 72 20 | an argu|ment or |
|00000820| 6d 61 6c 6c 6f 63 28 29 | 20 74 68 65 0a 3e 20 72 |malloc()| the.> r|
|00000830| 65 74 75 72 6e 2e 0a 0a | 20 20 4f 72 20 79 6f 75 |eturn...| Or you|
|00000840| 20 63 61 6e 20 6d 61 6c | 6c 6f 63 28 29 20 73 70 | can mal|loc() sp|
|00000850| 61 63 65 20 66 6f 72 20 | 70 41 20 61 6e 64 20 70 |ace for |pA and p|
|00000860| 42 2c 20 74 68 65 6e 20 | 73 74 72 63 70 79 28 70 |B, then |strcpy(p|
|00000870| 41 2c 20 0a 64 69 73 70 | 6c 61 79 5f 64 72 75 67 |A, .disp|lay_drug|
|00000880| 5f 74 79 70 65 28 69 53 | 6f 6d 65 49 6e 74 29 29 |_type(iS|omeInt))|
|00000890| 3b 20 77 68 69 63 68 20 | 74 61 6b 65 73 20 63 61 |; which |takes ca|
|000008a0| 72 65 20 6f 66 20 74 68 | 65 20 70 72 6f 62 6c 65 |re of th|e proble|
|000008b0| 6d 20 61 6e 64 20 61 76 | 6f 69 64 73 20 0a 6d 61 |m and av|oids .ma|
|000008c0| 6c 6c 6f 63 28 29 69 6e | 67 20 77 69 74 68 69 6e |lloc()in|g within|
|000008d0| 20 61 20 66 75 6e 63 74 | 69 6f 6e 20 28 49 20 70 | a funct|ion (I p|
|000008e0| 72 65 66 65 72 20 74 6f | 20 68 61 76 65 20 73 70 |refer to| have sp|
|000008f0| 61 63 65 20 61 6c 6c 6f | 63 61 74 65 64 20 66 6f |ace allo|cated fo|
|00000900| 72 20 0a 70 6f 69 6e 74 | 65 72 73 20 69 6e 20 74 |r .point|ers in t|
|00000910| 68 65 20 73 61 6d 65 20 | 73 63 6f 70 65 20 74 68 |he same |scope th|
|00000920| 65 20 70 6f 69 6e 74 65 | 72 73 20 61 72 65 20 64 |e pointe|rs are d|
|00000930| 65 63 6c 61 72 65 64 20 | 69 6e 20 77 68 65 6e 65 |eclared |in whene|
|00000940| 76 65 72 20 70 6f 73 73 | 69 62 6c 65 29 2e 0a 20 |ver poss|ible).. |
|00000950| 20 49 74 27 73 20 62 65 | 65 6e 20 61 20 77 68 69 | It's be|en a whi|
|00000960| 6c 65 20 73 69 6e 63 65 | 20 49 20 63 6f 6e 74 72 |le since| I contr|
|00000970| 69 62 75 74 65 64 20 74 | 6f 20 74 68 69 73 20 74 |ibuted t|o this t|
|00000980| 68 72 65 61 64 2c 20 73 | 6f 20 49 20 63 61 6e 27 |hread, s|o I can'|
|00000990| 74 20 0a 72 65 6d 65 6d | 62 65 72 20 65 78 61 63 |t .remem|ber exac|
|000009a0| 74 6c 79 20 69 66 20 64 | 65 63 6c 61 72 69 6e 67 |tly if d|eclaring|
|000009b0| 20 74 68 65 20 61 72 72 | 61 79 20 73 74 61 74 69 | the arr|ay stati|
|000009c0| 63 20 77 61 73 20 74 68 | 65 20 5f 62 65 73 74 5f |c was th|e _best_|
|000009d0| 20 73 6f 6c 75 74 69 6f | 6e 2c 20 0a 62 75 74 20 | solutio|n, .but |
|000009e0| 69 74 20 69 73 20 61 20 | 76 69 61 62 6c 65 20 6f |it is a |viable o|
|000009f0| 6e 65 2e 0a 0a 2f 2a 2a | 4a 61 6d 65 73 20 52 6f |ne.../**|James Ro|
|00000a00| 62 69 6e 73 6f 6e 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |binson**|********|
|00000a10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 20 20 20 |********|***** |
|00000a20| 20 20 20 20 20 20 20 20 | 20 0a 20 20 22 49 66 20 | | . "If |
|00000a30| 61 20 66 61 74 61 6c 20 | 65 72 72 6f 72 20 6f 63 |a fatal |error oc|
|00000a40| 63 75 72 73 2c 20 74 68 | 65 20 70 72 6f 67 72 61 |curs, th|e progra|
|00000a50| 6d 20 73 68 6f 75 6c 64 | 20 6e 6f 74 20 62 65 20 |m should| not be |
|00000a60| 61 6c 6c 6f 77 65 64 20 | 74 6f 20 63 6f 6e 74 69 |allowed |to conti|
|00000a70| 6e 75 65 2e 22 0a 20 2d | 2d 20 4f 72 61 63 6c 65 |nue.". -|- Oracle|
|00000a80| 20 50 72 6f 2a 43 20 55 | 73 65 72 27 73 20 47 75 | Pro*C U|ser's Gu|
|00000a90| 69 64 65 20 20 20 20 20 | 20 20 20 20 2a 2a 2a 2a |ide | ****|
|00000aa0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 6a 61 6d 65 73 2d 72 |********|*james-r|
|00000ab0| 6f 62 69 6e 73 6f 6e 40 | 75 69 6f 77 61 2e 65 64 |obinson@|uiowa.ed|
|00000ac0| 75 2a 2a 2f 0a | |u**/. | |
+--------+-------------------------+-------------------------+--------+--------+